<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/view/common/common.jsp"%>
	<script type="text/javascript">
		function searchData() {
			$('#tab').datagrid('load',serializeForm($('#mySearchForm')));
		}
		/* 1-买入，2-卖出 */
		function formatTypeData(val, row){
			if (val == '1') {
				return '买入';
			} else if(val == '2') {
				return '卖出';
			}
		}
		/* 0-待收款，1-待付款，2-待确认，3-已取消，4-已成交 */
		function formatStatusData(val, row){
			if (val == '0') {
				return '待收款';
			} else if(val == '1') {
				return '待付款';
			}else if(val == '2') {
				return '待确认';
			}else if(val == '3') {
				return '已取消';
			}else if(val == '4') {
				return '已成交';
			}
		}
		
		function loadSMSCalendarYMD() {
			WdatePicker({dateFmt:"yyyy-MM-dd"});
		}
	</script>

</head>
<body>

<div class="easyui-panel"  fit="true">
	<div id="jqueryToolbar" style="padding:auto;height:auto">
		<div style="margin-top:5px; padding-bottom:8px; border-bottom:1px solid #ccc;">
			<form id="mySearchForm" action="" method="Post">
				手机:<input type="text" id="phone" name="phone" class="easyui-textbox"  style="width: 100px; height: 25px;"/>
				订单号:<input type="text" id="order_no" name="order_no" class="easyui-textbox"  style="width: 140px; height: 25px;"/>
				状态:
				<!-- 0-待收款，1-待付款，2-待确认，3-已取消，4-已成交 -->
				<select  class="easyui-combobox" name="status" id="status" style="width:80px;height: 25px;" data-options="panelHeight:'auto'">
				<option value="">全部</option>
				<option value=0>待收款</option>
				<option value=1>待付款</option>
				<option value=2>待确认</option>
				<option value=3>已取消</option>
				<option value=4>已成交</option>
			</select>

				时间：
				<input type="text" id="startTime" name="startTime" class="easyui-datebox"  style="width:110px;height: 25px;">
				<input type="text" id="endTime" name="endTime" class="easyui-datebox" style="width:110px;height: 25px;"/>
				<%--<input class="input-medium" id="startTime" name="startTime" type="text" onclick="loadSMSCalendarYMD()" style="width: 80px;"/>---%>
					  <%--<input class="input-medium" id="endTime" name="endTime" type="text" onclick="loadSMSCalendarYMD()" style="width: 80px;"/>--%>
				<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="searchData()">查询</a>
			</form>
		</div>
	</div>

	<table id="tab" class="easyui-datagrid"  fit="true" style="height:350px;width:auto" url="${ctx}/tOrder/getTOrderList.do"
		   rownumbers="true" pagination="true" pagePosition="top" singleSelect="true">
		<thead>
		<tr>
			<th field="order_no"  width="150" align="center">订单号</th>
			<th field="trade_num" width="60" align="center">交易数量</th>
			<th field="money" width="50" align="center">金额</th>
			<th field="platform_price" width="50" align="center">平台价</th>
			<th field="create_time" width="130" align="center">创建时间</th>
			<th field="type" width="80" align="center" data-options="formatter:formatTypeData" >类型</th>
			<th field="status" width="80" align="center" data-options="formatter:formatStatusData" >状态</th>
			<th field="nick_name"  width="60" align="center">昵称</th>
			<th field="phone"  width="100" align="center">手机号</th>
			<th field="uid"  width="100" align="center">uid</th>
		</tr>
		</thead>
	</table>
</div>
</body>
</html>
